<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8"/>
    <title>登录</title>
</head>
<body>
<!--登录框-->
<div>
    <form class="login-form">
        <!--二维码登录-->
        <div id="weixin"></div>
    </form>
</div>
<!--微信官方提供的生成二维码的js-->
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
</body>
<script>
    var obj = new WxLogin({
        self_redirect: true,
        id: "weixin",
        appid: "wx7287a60bb700fd21",
        scope: "snsapi_login",
        redirect_uri: "http://www.txjava.cn/login"
})
; </script>
</html>